<?php
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


//iconv_set_encoding("input_encoding", "ISO-8859-2");
//iconv_set_encoding("internal_encoding", "ISO-8859-2");
//iconv_set_encoding("output_encoding", "ISO-8859-2");
$html = iconv('ISO-8859-2', 'UTF-8', file_get_contents('http://www.jobs.pl/wyszukiwanie/-,badania/jako%C5%9B%C4%87/analiza,-,-,-,0,-,-'));
$html = mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8');
$DOM = new DOMDocument;
//echo $html;
$DOM->loadHTML($html);

$XPath = new DOMXPath($DOM);

$result = $XPath->query("//a");
var_dump($result);
foreach($result as $r)
{
	echo $r->C14N();
}

print_r(iconv_get_encoding('all'));
?>
